Namespace Controls
    <Serializable(), ObfuscationAttribute(Exclude:=True, ApplyToMembers:=True)> _
    Public Class GraphContainerSettingCollection
        Inherits KeyedCollectionWithEvents(Of String, GraphContainerSetting)

        Private mPaneCount As Integer

        Sub New()
            MyBase.New()
            mPaneCount = 2
        End Sub
        Protected Overrides Function GetKeyForItem(ByVal item As GraphContainerSetting) As String
            Return item.Name
        End Function

        Public Property PaneCount() As Integer
            Get
                Return mPaneCount
            End Get
            Set(ByVal value As Integer)
                mPaneCount = value
            End Set
        End Property

        Overloads Sub CopyTo(ByVal collection As GraphContainerSettingCollection)
            If Me.Count > 0 Then
                For Each item As GraphContainerSetting In Me
                    collection.Add(item)
                Next
            End If
        End Sub

#Region "Serialization functions"
        Sub New(ByVal Info As Runtime.Serialization.SerializationInfo, ByVal context As Runtime.Serialization.StreamingContext)
            MyBase.New(Info, context)
        End Sub

        Public Overrides Sub GetObjectDataAdditionalSerialization(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext)
            info.AddValue("mPaneCount", mPaneCount)
        End Sub

        Public Overrides Sub NewAdditionalDeserialization(ByVal Info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext)
            mPaneCount = Info.GetInt32("mPaneCount")
        End Sub

#End Region


    End Class

End Namespace

